package com.briup.es.demos.web;

import org.springframework.util.StringUtils;

public class UserServicelmpl {
}





@Override
public  String login(String username,String password){
    //判断用户名和密码是否有效，如:username=null username=""
    if(username == null || uesrname.trim().isEmpty()){
        return "用户名不能为空";
    }



    if(!StringUtils.hasText(password)){
        return "密码不能为空";
    }
    User user = userMapper.queryByUsername(username);
    if (user == null){
        return "该用户不存在";
    }

    if (!password.equals(user.getPassword())){
        return "您输入的密码有误，请重新输入";
    }
    if(0 != user.getstatus()

    //根据用户名去数据库中查询用户数据
    return "";
}